<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<style>
    :root {
        --primary: #2E7D32;
        --primary-light: #4CAF50;
        --primary-lighter: #81C784;
        --primary-dark: #1B5E20;
        --success: #388E3C;
        --warning: #F57C00;
        --danger: #D32F2F;
        --gray-50: #F9FAFB;
        --gray-100: #F3F4F6;
        --gray-200: #E5E7EB;
        --gray-300: #D1D5DB;
        --gray-600: #4B5563;
        --gray-700: #374151;
        --gray-800: #1F2937;
    }

    .admin-header {
        background: var(--primary-dark);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        padding: 16px 24px;
        margin-bottom: 24px;
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .header-container {
        max-width: 1400px;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .brand {
        display: flex;
        align-items: center;
        gap: 12px;
        text-decoration: none;
        padding: 8px;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .brand:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .brand-logo {
        font-size: 24px;
        font-weight: 600;
        color: white;
        margin: 0;
    }

    .brand-divider {
        width: 2px;
        height: 24px;
        background: rgba(255, 255, 255, 0.2);
    }

    .brand-section {
        font-size: 16px;
        color: var(--gray-200);
        font-weight: 500;
    }

    .nav-menu {
        display: flex;
        gap: 4px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-item {
        position: relative;
    }

    .nav-link {
        display: inline-flex;
        align-items: center;
        padding: 8px 16px;
        color: var(--gray-200);
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        border-radius: 6px;
        transition: all 0.3s ease;
    }

    .nav-link:hover {
        color: white;
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-1px);
    }

    .nav-link.active {
        color: white;
        background: var(--primary);
    }

    .nav-link i {
        margin-right: 8px;
        font-size: 16px;
        opacity: 0.9;
    }

    /* 按钮样式 */
    .nav-link[href="adminLogout"] {
        background: rgba(255, 255, 255, 0.1);
        margin-left: 8px;
    }

    .nav-link[href="adminLogout"]:hover {
        background: rgba(255, 255, 255, 0.2);
        color: white;
    }

    /* 响应式调整 */
    @media (max-width: 1024px) {
        .nav-menu {
            gap: 2px;
        }

        .nav-link {
            padding: 8px 12px;
        }
    }

    @media (max-width: 768px) {
        .admin-header {
            padding: 12px 16px;
        }

        .brand-logo {
            font-size: 20px;
        }

        .brand-section {
            font-size: 14px;
        }

        .nav-link {
            padding: 6px 10px;
            font-size: 13px;
        }

        .nav-link i {
            margin-right: 6px;
        }
    }

    /* 添加滚动阴影效果 */
    .admin-header.scrolled {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                    0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }
</style>
</head>
<body>
    <header class="admin-header">
        <div class="header-container">
            <a href="index" class="brand">
                <h1 class="brand-logo">宠物商店</h1>
                <div class="brand-divider"></div>
                <span class="brand-section">管理后台</span>
            </a>

            <nav>
                <ul class="nav-menu">
                    <li class="nav-item">
                        <a class="nav-link ${param.flag==1?'active':''}" href="index">
                            <i class="fas fa-home"></i>首页
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link ${param.flag==2?'active':''}" href="orderList">
                            <i class="fas fa-shopping-cart"></i>订单管理
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link ${param.flag==3?'active':''}" href="userList">
                            <i class="fas fa-users"></i>用户管理
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link ${param.flag==4?'active':''}" href="goodList">
                            <i class="fas fa-box"></i>商品管理
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link ${param.flag==5?'active':''}" href="typeList">
                            <i class="fas fa-tags"></i>类目管理
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="adminLogout">
                            <i class="fas fa-sign-out-alt"></i>退出
                        </a>
                    </li>
                </ul>
            </nav>
        </div>
    </header>

    <!-- Font Awesome CDN -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">

    <!-- 添加滚动效果 -->
    <script>
        window.addEventListener('scroll', function() {
            const header = document.querySelector('.admin-header');
            if (window.scrollY > 0) {
                header.classList.add('scrolled');
            } else {
                header.classList.remove('scrolled');
            }
        });
    </script>
</body>
</html>